﻿{include file="/public/header" /}
<div class="content-wraper full">
    <div class="search_wraper" style="min-height: 51px;">
        <form class="normal_form search_form" onsubmit="return false;">
            <div class="condition" onscroll="Core.scrolling(this)">
                <div class="row inline-row" row-name="mydatetime">
                    
                    <div class="field_text">订单日期：</div>
                    <div style="display: inline-block;vertical-align: top;">
                        <input type="text" name="sday[0]" id="sday0" data-options="seconds:false,maxDate:sday1" class="input-text date-ico" isHideClear isHidereadOnly readonly value="{$Today ?? ''}" defaultv="{$Today ?? ''}" placeholder="请选择开始时间" />
                        <span class="form-to">-</span> <input type="text" name="sday[1]" id="sday1" data-options="seconds:false,minDate:sday0" class="input-text date-ico" isHideClear isHidereadOnly readonly value="{$Today ?? ''}" defaultv="{$Today ?? ''}" placeholder="请选择结束时间" />
                    </div>
                </div>               
            </div>
            <div class="row form-footer-bar">
                <button class="btn" type="reset" role="btn-cancel">重置</button>
                <button r-button class="btn btn-primary search-btn" type="submit" role="btn-submit">搜索</button>
                <button r-button style="display: none;" class="btn switch_search filter">展开搜索条件<i class="fa fa-angle-down"></i></button>
                <button r-button style="display: none;" class="tools-bar">
                    <div class="field_text">本页结算金额：<span data-key="pdaypayt">0</span></div>
                    <div class="field_text">总计结算金额：<span data-key="daypayt">0</span></div>
                </button>
                <div style="margin: 10px 0 -10px;"><a class="search_close"><i class="fa fa-angle-up"></i>收起</a></div>
            </div>            
        </form>
    </div>
    <div class="table_box">
        <table class="table_main" id="datalist"></table>
    </div>
</div>
<script type="text/javascript">
Core.Easyui.FieldColumn = [
    {field:'dayrcvd',title:'当日平台代收金额(元)',width:180,align:'center'},
    {field:'daypayt',title:'当日结算金额(元)',width:120,align:'center'},
    {field:'dayuid',title:'当日剩余未结算金额(元)',width:180,align:'center'},
    {field:'settled',title:'是否结清',width:100,align:'center',formatter:function(value,row,index){
        return ['<span style="color:red">否</span>','<i class="fa fa-check" style="color:green"></i>'][value] || '';
	}},
    {field:'-',title:'',align:'left'},
];
Core.Easyui.FrozenColumn = [
    {field:'ck',checkbox:true,width:30},
    {field:'id',title:'ID',width:80,align:'center'},
    {field:'sday',title:'结算日期',width:120,align:'center'},    
];
Core.Easyui.init($("#datalist"), {
    url: "{$_G['_mc_'] ?? ''}/ajax",
    idField: "payid",
    fitColumns: false,
    singleSelect : true,
    columns: [Core.Easyui.FieldColumn],
    frozenColumns: [Core.Easyui.FrozenColumn],
    pageSize: 50,
    onLoadSuccess:function(data){
        $('span[data-key="pdaypayt"]').text((data.pdaypayt || 0)+' 元');
        $('span[data-key="daypayt"]').text((data.daypayt || 0)+' 元');
    },
    onDblClickRow: function (index,row){
        Core.Sys.Action('pop',row);
    },
},$(".search_form"));

/**搜索 */
var Table_Filters = Core.Search.searchArray();
var filterType = Core.Search.typeList();
//var rsourceUrl = "/index/ajax/index"; //搜索字段基础数据
//var regionUrl = "/index/ajax/district/level/"; //城市搜索字段
Core.Search.initFilter("{$_G['_mc_'] ?? ''}/column",null);

$(document).ready(function(){
});
</script>
{include file="/public/footer" /}